/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rmi;

import java.util.Calendar;
import java.util.Date;

/**
 *
 * @author xarckane
 */
public class User {
    private String ip;
    private Date time=Calendar.getInstance().getTime();

    public User(String ip) {
        this.ip = ip;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public boolean equals(Object o) {
        if (o instanceof User){
            if (this.ip.equals(((User)o).getIp())){
                return true;
            }
        }
        return false;
    }

    @Override
    public int hashCode() {
       return this.ip.hashCode();
    }
    
    
    
}
